package com.ms.demo;

/**
 * @description: 船舰一个实现了Shape接口的抽象装饰者类ShapeDecorator 并把Shape对象作为它的实例变量
 * @author: ms
 * @create: 2022-10-26 10:00
 */
public abstract class ShapeDecorator implements Shape{

    public Shape decoratedShape;

    public ShapeDecorator(Shape decoratedShape) {
        this.decoratedShape = decoratedShape;
    }

    public void draw(){
        decoratedShape.draw();
    }

}